import './assets/main.scss'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import 'amfe-flexible'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(createPinia().use(({store})=>{

  const initialState = JSON.parse(JSON.stringify(store.$state));

  store.$reset = ()=>{

    store.$state = JSON.parse(JSON.stringify(initialState));

  }

}))
app.use(router)

app.mount('#app')
